home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / Q-R / QuickTurtle.cpt / QuickTurtle / QuickTurtle.rsrc / STR#_103.txt < prev    next >
Encoding:
Text File  |  1991-06-27  |  1.8 KB  |  76 lines

  1. ‚Äú+‚Äù is the addition operator, also called the plus sign, or sometimes (in the vulgar tabloids) simply the ‚Äúplus‚Äù.  It causes addition to be executed.
  2.  
  3.   2 + 1 = 3
  4.  
  5. ‚Äú-‚Äù is the subtraction operator, popularly known as the minus sign.
  6.  
  7.   2 - 1 = 1
  8.  
  9. ‚Äú*‚Äù is the multiplication operator.  
  10.  
  11.   2 * 2 = 4
  12.  
  13. ‚Äú/‚Äù is the division operator.  The result can include a decimal fraction.
  14.  
  15.   4 / 2 = 2
  16.   5 / 2 = 2.5
  17.  
  18. ‚Äúdiv‚Äù is the integer-division operator.  Division is performed and the result is truncated, i.e., the remainder, if any, is thrown away. 
  19.  
  20.   4 div 2 = 2
  21.   5 div 2 = 2
  22.  
  23. ‚Äúmod‚Äù is the modulo operator, returning the remainder of a division operation.  Examples:
  24.  
  25.   5 mod 2 = 1 
  26.   (1 is the remainder of 5/2)
  27.  
  28.   4 mod 2 = 0 
  29.   (4 / 2 leaves no remainder)
  30.  
  31. ‚Äú=‚Äù is the equals sign, used in boolean expressions, i.e. expressions that are either true or false.
  32.  
  33.     ‚Äú1 = 1‚Äù is true
  34.     ‚Äú1 = 2‚Äù is false
  35.  
  36. ‚Äú<>‚Äù is the unequal sign.
  37.  
  38.     ‚Äú1 <> 1‚Äù is false
  39.     ‚Äú1 <> 2‚Äù is true
  40.  
  41. ‚Äú>‚Äù is the greater-than sign.
  42.  
  43.   ‚Äú1 > 1‚Äù is false
  44.   ‚Äú2 > 1‚Äù is true
  45.  
  46. ‚Äú<‚Äù is the less-than sign.
  47.  
  48.   ‚Äú1 < 1‚Äù is false
  49.   ‚Äú1 < 2‚Äù is true
  50.  
  51. ‚Äú>=‚Äù is the greater-than-or-equal-to sign
  52.  
  53.   ‚Äú1 >= 1‚Äù is true
  54.   ‚Äú1 >= 2‚Äù is false
  55.  
  56. ‚Äú<=‚Äù is the less-than-or-equal-to sign
  57.  
  58.   ‚Äú1 <= 1‚Äù is true
  59.   ‚Äú2 <= 1‚Äù is false
  60.  
  61. ‚Äúand‚Äù returns true if both of two boolean expressions it joins are true, otherwise false.
  62.  
  63.   ‚Äú(1=1) and (2=2)‚Äù is true
  64.   ‚Äú(1=1) and (2=1)‚Äù is false
  65.  
  66. ‚Äúor‚Äù returns true if either of two boolean expressions it joins are true, false if both are false.
  67.  
  68.   ‚Äú(1=1) or (1=2)‚Äù is true
  69.   ‚Äú(1=2) or (2=3)‚Äù is false
  70.  
  71. ‚Äúnot‚Äù returns the opposite of a boolean result.
  72.  
  73.   ‚Äúnot (1=2)‚Äù is true
  74.   ‚Äúnot (1=1)‚Äù is false
  75.  
  76.